package org.zebra.web.support;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ServletModelAttributeMethodProcessor;

/**
 * http post get 参数 下划线转驼峰
 */
@Deprecated
public class UnderlineToHumpArgumentProcessor extends ServletModelAttributeMethodProcessor {

    public UnderlineToHumpArgumentProcessor(boolean annotationNotRequired) {
        super(annotationNotRequired);
    }

    @Override
    protected void bindRequestParameters(WebDataBinder binder, NativeWebRequest nativeWebRequest) {
        Object target = binder.getTarget();
        UnderlineToHumpRequestDataBinder dataBinder =
                new UnderlineToHumpRequestDataBinder(target, binder.getObjectName());
        super.bindRequestParameters(dataBinder, nativeWebRequest);
    }
}
